<template>
	<view>
		<label @click="choose">
			<image v-if="!checked" src="../../static/img/outcheak.png"></image>
			<image v-if="checked" src="../../static/img/cheacked.png"></image>
			<text>{{text}}</text>
		</label>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				checked: false,
				text: '设为默认',
				list:[1,2]
			};
		},
		methods: {
			choose() {
				this.checked = !this.checked;
				if(this.text=='设为默认'){
					this.text='已设为默认'
				}else{
					this.text='设为默认'
				}
			}
		}
	}
</script>

<style scoped>
	label image {
		width: 38rpx;
		height: 38rpx;
		vertical-align: bottom;
		margin-right: 6px;
	}
</style>
